Global gFindString, gFindCase As Integer, gFindDirection As Integer
Global gCurPos As Integer, gFirstTime As Integer
Global ArrayNum As Integer
' API functions used to read and write to MDINOTE.INI.
' Used for handling the recent files list.
Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lplFileName As String) As Integer
Function AnyPadsLeft () As Integer
Dim i As Integer
' Cycle throught the document array.
' Return True if there is at least one
' open document remaining.
For i = 1 To UBound(Document)
If Not FState(i).Deleted Then
AnyPadsLeft = True
Exit Function
End If
Next
End Function
Sub CenterForm (frmParent As Form, frmChild As Form)
' This procedure centers a child form over a parent form.
' Calling this routine loads the dialog. Use the Show method
' to display the dialog after calling this routine ( ie MyFrm.Show 1)
Dim l, t
' get left offset
l = frmParent.Left + ((frmParent.Width - frmChild.Width) / 2)
If (l + frmChild.Width > screen.Width) Then
l = screen.Width = frmChild.Width
End If
' get top offset
t = frmParent.Top + ((frmParent.Height - frmChild.Height) / 2)